#include <bits/stdc++.h>
using namespace std;

bool is_bigger(char c){
    return c >= 'A' && c <= 'Z';
}
string convert_1(vector<string> vec_str){
    string res = "";
    for(int i = 0; i < vec_str.size(); ++i){
        vec_str[i][0] -= 32;
        res += vec_str[i];
    }
    return res;
}
string convert_2(vector<string> vec_str){
    string res = vec_str[0];
    for(int i = 1; i < vec_str.size(); ++i){
        vec_str[i][0] -= 32;
        res += vec_str[i];
    }
    return res;
}
string convert_3(vector<string> vec_str){
    string res = vec_str[0];
    for(int i = 1; i < vec_str.size(); ++i){
        res += '_';
        res += vec_str[i];
    }
    return res; 
}
string convert_4(vector<string> vec_str){
    string res = vec_str[0];
    for(int i = 1; i < vec_str.size(); ++i){
        res += '-';
        res += vec_str[i];
    }
    return res; 
}
int main(int argc, char const *argv[])
{
    freopen("demo.txt", "r", stdin);
    string str, tmp;
    cin >> str;
    if(str == "") {
        cout << str;
        return 0;
    }

    vector<string> vec_str;
    int left = 0, right = 0, size = str.size();
    if(is_bigger(str[0])){
        while(right != size){
            ++right;
            while(right != size && !is_bigger(str[right])) ++right;
            tmp = str.substr(left, right - left);
            tmp[0] += 32;
            vec_str.push_back(tmp);
            left = right;
        }
    }
    else if((right = str.find("_", left)) != string::npos){
        while(right != string::npos){
            tmp = str.substr(left, right - left);
            vec_str.push_back(tmp);
            left = right + 1;
            right = str.find("_", left);
        }
        tmp = str.substr(left);
        vec_str.push_back(tmp);
    }
    else if((right = str.find("-", left)) != string::npos){
        while(right != string::npos){
            tmp = str.substr(left, right - left);
            vec_str.push_back(tmp);
            left = right + 1;
            right = str.find("-", left);
        }
        tmp = str.substr(left);
        vec_str.push_back(tmp);
    }
    else{
        while(right != size){
            ++right;
            while(right != size && !is_bigger(str[right])) ++right;
            tmp = str.substr(left, right - left);
            if(left != 0) tmp[0] += 32;
            vec_str.push_back(tmp);
            left = right;
        }
    }

    for(auto& e: vec_str) cout << e << " ";
    cout << endl;

    string res1 = convert_1(vec_str);
    // cout << res1 << endl;
    string res2 = convert_2(vec_str);
    // cout << res2 << endl;
    string res3 = convert_3(vec_str);
    // cout << res3 << endl;
    string res4 = convert_4(vec_str);
    // cout << res4 << endl;

    cout << res1 << " " << res2 << " " << res3 << " " << res4;

    return 0;
}
